Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organized Code #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions src/BiteConsent.tsx → src/components/BiteConsent.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { AnimatePresence, motion } from 'framer-motion'
import React, { useEffect } from 'react'
import CookieConfig from './CookieConfig'
import CookieConfig from '../config/CookieConfig'
import { Cookies } from './Illustrations'
import Position, { CustomPosition, isCustomPosition } from './Position'
import { useTheme } from './ThemeContext'
import Position, { CustomPosition, isCustomPosition } from '../utils/Position'
import { useTheme } from '../context/ThemeContext'

const CONSENT_COOKIE_NAME = 'cookie_consent'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/useBiteConsent.tsx → src/hooks/useBiteConsent.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useCallback } from 'react'
import { createRoot } from 'react-dom/client'
import { BiteConsent, CONSENT_COOKIE_NAME } from './BiteConsent'
import CookieConfig from './CookieConfig'
import Position, { CustomPosition } from './Position'
import ThemeProvider, { Theme } from './ThemeContext'
import { BiteConsent, CONSENT_COOKIE_NAME } from '../components/BiteConsent'
import CookieConfig from '../config/CookieConfig'
import Position, { CustomPosition } from '../utils/Position'
import ThemeProvider, { Theme } from '../context/ThemeContext'

const BITE_CONSENT_VIEW_ELEMENT_ID = 'bite-consent-view'

Expand Down
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BiteConsent } from './BiteConsent'
import Position, { CustomPosition } from './Position'
import useBiteConsent from './useBiteConsent'
import { BiteConsent } from './components/BiteConsent'
import Position, { CustomPosition } from './utils/Position'
import useBiteConsent from './hooks/useBiteConsent'

export { BiteConsent, CustomPosition, Position, useBiteConsent }

File renamed without changes.