Merge branch 'GRA0007:main' into feat/ClipboardCopy

This commit is contained in:
Midas 2023-06-20 12:26:29 +01:00 committed by GitHub
commit 99fce5e395
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 83 additions and 72 deletions

View file

@ -12,6 +12,7 @@ jobs:
build-and-push: build-and-push:
name: Deploy to Fly.io name: Deploy to Fly.io
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'GRA0007/crab.fit'
defaults: defaults:
run: run:

View file

@ -16,6 +16,7 @@ jobs:
deploy: deploy:
name: Deploy to Vercel name: Deploy to Vercel
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'GRA0007/crab.fit'
defaults: defaults:
run: run:

View file

@ -10,7 +10,16 @@
"react-hooks/exhaustive-deps": "off", "react-hooks/exhaustive-deps": "off",
"space-infix-ops": "warn", "space-infix-ops": "warn",
"comma-spacing": "warn", "comma-spacing": "warn",
"react-hooks/rules-of-hooks": "off" "react-hooks/rules-of-hooks": "off",
"eqeqeq": "error",
"no-return-await": "warn",
"no-var": "error",
"prefer-const": "warn",
"eol-last": ["warn", "always"],
"indent": ["warn", 2],
"semi": ["error", "never"],
"arrow-parens": ["error", "as-needed"],
"jsx-quotes": ["warn", "prefer-double"]
}, },
"overrides": [ "overrides": [
{ {

View file

@ -22,12 +22,10 @@ const RecentEvents = ({ eventId, times, onImport }: RecentEventsProps) => {
const { t, i18n } = useTranslation('event') const { t, i18n } = useTranslation('event')
const allRecents = useStore(useRecentsStore, state => state.recents) const allRecents = useStore(useRecentsStore, state => state.recents)
const recents = useMemo(() => const recents = useMemo(() => allRecents
allRecents
?.filter(hasAvailability) ?.filter(hasAvailability)
.filter(e => e.id !== eventId && e.user.availability.some(a => times.includes(a))) ?? [], .filter(e => e.id !== eventId && e.user.availability.some(a => times.includes(a))) ?? [],
[allRecents] [allRecents])
)
const [isOpen, setIsOpen] = useState(false) const [isOpen, setIsOpen] = useState(false)
const [selected, setSelected] = useState<string>() const [selected, setSelected] = useState<string>()

View file

@ -121,7 +121,7 @@ const Month = ({ value, onChange }: MonthProps) => {
</div> </div>
{hasPastDates && <div className={styles.warningLabel}> {hasPastDates && <div className={styles.warningLabel}>
<AlertTriangle size='1.2em' /> <AlertTriangle size="1.2em" />
<span>{t('form.dates.warnings.date_in_past')}</span> <span>{t('form.dates.warnings.date_in_past')}</span>
</div>} </div>}
</> </>

View file

@ -43,6 +43,6 @@ const ToggleField = <TValue extends string>({
</div> </div>
)} )}
</div> </div>
</Wrapper> </Wrapper>
export default ToggleField export default ToggleField

View file

@ -63,6 +63,7 @@
"select_all": "Select all", "select_all": "Select all",
"select_none": "Select none", "select_none": "Select none",
"select_invert": "Invert selection", "select_invert": "Invert selection",
"google_cal": "Sync with Google Calendar", "google_cal": "Sync with Google Calendar",
"outlook_cal": "Sync with Outlook Calendar", "outlook_cal": "Sync with Outlook Calendar",
"integration": { "integration": {

View file

@ -20,6 +20,7 @@ export const detectBrowser = () => {
const isChrome = !!window.chrome const isChrome = !!window.chrome
// Edge (based on chromium) detection // Edge (based on chromium) detection
// eslint-disable-next-line eqeqeq
const isEdgeChromium = isChrome && (navigator.userAgent.indexOf("Edg") != -1) const isEdgeChromium = isChrome && (navigator.userAgent.indexOf("Edg") != -1)
if (isEdgeChromium) return 'edge_chromium' if (isEdgeChromium) return 'edge_chromium'