Add brewery discovery & detail pages with location-based search (#253)

This commit is contained in:
Aaron Po
2026-08-29 00:44:33 -04:00
committed by GitHub
parent 92a30b11db
commit a580314583
90 changed files with 3874 additions and 187 deletions

View File

@@ -0,0 +1,21 @@
import { useSyncExternalStore, type ReactNode } from 'react';
interface ClientOnlyProps {
children: () => ReactNode;
fallback?: ReactNode;
}
const noop = () => undefined;
const emptySubscribe = () => noop;
const ClientOnly = ({ children, fallback = null }: ClientOnlyProps) => {
const mounted = useSyncExternalStore(
emptySubscribe,
() => true,
() => false,
);
return mounted ? children() : fallback;
};
export default ClientOnly;