File tree Expand file tree Collapse file tree 2 files changed +1
-32
lines changed
Expand file tree Collapse file tree 2 files changed +1
-32
lines changed Original file line number Diff line number Diff line change @@ -6,39 +6,13 @@ import { sanitizeLogoState } from "@/iconlogo/domain/logo/logo.validators";
66import TanStackQueryProvider from "@/iconlogo/integrations/tanstack-query/root-provider" ;
77import { AppShell } from "@/iconlogo/features/editor/AppShell" ;
88
9- const DEFAULT_PRESET_SHARE_ID = "QMfIxW" ;
10-
119export default function IconLogoEditorClient ( ) {
1210 const [ sharedLogo , setSharedLogo ] = useState < LogoState | null > ( null ) ;
1311
1412 useEffect ( ( ) => {
1513 const resolveSharedLogo = async ( ) => {
1614 const raw = new URLSearchParams ( window . location . search ) . get ( "s" ) ;
17- if ( ! raw ) {
18- // Always start from the curated preset when no share id is provided.
19- try {
20- const response = await fetch ( `/api/iconlogo/share/${ DEFAULT_PRESET_SHARE_ID } ` , {
21- method : "GET" ,
22- cache : "no-store" ,
23- } ) ;
24-
25- if ( ! response . ok ) {
26- setSharedLogo ( null ) ;
27- return ;
28- }
29-
30- const data = ( await response . json ( ) ) as { logo ?: unknown } ;
31- if ( ! data . logo ) {
32- setSharedLogo ( null ) ;
33- return ;
34- }
35-
36- setSharedLogo ( sanitizeLogoState ( data . logo ) ) ;
37- } catch {
38- setSharedLogo ( null ) ;
39- }
40- return ;
41- }
15+ if ( ! raw ) return ;
4216
4317 // New format: short id, e.g. ?s=fsfOMX
4418 if ( / ^ [ A - Z a - z 0 - 9 _ - ] { 4 , 16 } $ / . test ( raw ) ) {
Original file line number Diff line number Diff line change @@ -17,14 +17,9 @@ export function loadLogoFromState(logo: LogoState) {
1717 d . iconBorderWidth = logo . iconBorderWidth ;
1818 d . iconSize = logo . iconSize ;
1919 d . iconRotation = logo . iconRotation ;
20- d . iconOffsetX = logo . iconOffsetX ;
21- d . iconOffsetY = logo . iconOffsetY ;
2220 d . background = logo . background ;
2321 d . borderRadius = logo . borderRadius ;
2422 d . borderWidth = logo . borderWidth ;
2523 d . borderColor = logo . borderColor ;
26- d . textMode = logo . textMode ;
27- d . logoText = logo . logoText ;
28- d . fontFamily = logo . fontFamily ;
2924 } ) ;
3025}
You can’t perform that action at this time.
0 commit comments