Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ playwright/.auth

*storybook.log
storybook-static

# Tamagui compiler cache
.tamagui
22 changes: 17 additions & 5 deletions frontend/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
import type { Preview } from '@storybook/react-vite';
import { TamaguiProvider } from 'tamagui';
import tamaguiConfig from '../tamagui.config';
import '../src/styles/main.scss';
import { withQueryClient } from './decorators/withQueryClient';

const preview: Preview = {
// Global so any component that calls a TanStack Query hook - directly or
// transitively (e.g. `useFeatureFlag` -> `useAppConfig`) - doesn't crash
// for lack of a QueryClientProvider ancestor. See withQueryClient's
// comment for how a story seeds its own query data.
decorators: [withQueryClient],
decorators: [
// Global so any component that calls a TanStack Query hook - directly or
// transitively (e.g. `useFeatureFlag` -> `useAppConfig`) - doesn't crash
// for lack of a QueryClientProvider ancestor. See withQueryClient's
// comment for how a story seeds its own query data.
withQueryClient,
// Mirrors the app root (src/main.tsx) so components adopting Tamagui
// primitives (starting with ProgressBar, #580) render correctly here too,
// rather than every future story needing its own wrap.
(Story) => (
<TamaguiProvider config={tamaguiConfig} defaultTheme="light">
<Story />
</TamaguiProvider>
),
],
parameters: {
controls: {
matchers: {
Expand Down
2 changes: 1 addition & 1 deletion frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { defineConfig, globalIgnores } from 'eslint/config'
import tseslint from 'typescript-eslint'

export default defineConfig([
globalIgnores(['dist', 'storybook-static', 'tests/', 'src/pages/RegisterPage/RegisterPage.backup.jsx']),
globalIgnores(['dist', 'storybook-static', 'tests/', 'src/pages/RegisterPage/RegisterPage.backup.jsx', '.tamagui']),
{
files: ['**/*.{js,jsx}'],
extends: [
Expand Down
Loading
Loading