Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): one aligned notice for ChatGPT sharing limits #31277

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 8 commits intomain fromrefs/pull/31277/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 4 changed files with 94 additions and 76 deletions (loading 1).

x
0 of 4 viewed, 4 left
0 additions and 69 deletionsapps/mobile/src/features/threads/ChatGptUsageLimitNotice.tsxDeleted
@@ -1,69 +0,0 @@
-import type { EnvironmentThreadShell } from "@t3tools/client-runtime/state/shell";
-import {
- CHATGPT_USAGE_LIMIT_CODE,
- CHATGPT_USAGE_URL,
- CHATGPT_WORKSPACE_ADMIN_REQUEST,
- CHATGPT_WORKSPACE_USAGE_LIMIT_CODE,
-} from "@t3tools/shared/usageLimits";
-import * as Clipboard from "expo-clipboard";
-import { useState } from "react";
-import { Linking, View } from "react-native";
-import { ProviderIcon } from "../../components/ProviderIcon";
-import { AppText as Text } from "../../components/ui/AppText";
-import { Button } from "../../components/ui/Button";
-​
-export function ChatGptUsageLimitNotice({ thread }: { thread: EnvironmentThreadShell }) {
- const [status, setStatus] = useState<"copied" | "copy-failed" | "open-failed" | null>(null);
- const code = thread.runtime?.lastErrorCode;
- const workspaceLimit = code === CHATGPT_WORKSPACE_USAGE_LIMIT_CODE;
- if (thread.runtime?.status !== "failed" || (!workspaceLimit && code !== CHATGPT_USAGE_LIMIT_CODE))
- return null;
- return (
- <View
- accessibilityRole="alert"
- className="mx-3 mb-2 gap-2 rounded-xl border border-border-subtle bg-screen p-3"
- >
- <View className="flex-row items-center gap-2">
- <ProviderIcon provider="codex" size={16} />
- <Text className="text-sm font-t3-medium text-foreground">ChatGPT usage limit reached</Text>
- </View>
- <Text className="text-xs text-foreground-muted">