Skip to content

Commit

Permalink
[PREVIEW] i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyd-eth committed Oct 3, 2023
1 parent 93e48d9 commit efc69c8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import {
import { useContext } from 'react'

/**
* Determines if there's an NFT conflict between the current and queued funding cycle metadata.
* A conflict arises if there are differences in the NFT related attributes.
* Determines if a "Launch NFTs" (NftDeployer.reconfigureFundingCycleOf) has been called
* in the same cycle as an "Edit cycle" (reconfigureFundingCycleOf) tx. If so, need to pass
* the new delegate and other NFT related attributes into the subsequent "Edit cycle" tx so
* they are not overriden and lost.
*
* @param {V2V3FundingCycleMetadata} currentFcMetadata - The current funding cycle metadata.
* @param {V2V3FundingCycleMetadata} queuedFcMetadata - The queued funding cycle metadata.
Expand Down Expand Up @@ -48,13 +50,6 @@ export const useResolveEditCycleConflicts = () => {
const queuedFcData: V2V3FundingCycleData = queuedCycle[0]
const queuedFcMetadata: V2V3FundingCycleMetadata = queuedCycle[1]

/**
* Resolves any potential conflicts in the reconfiguration of funding cycles.
* It merges the given data with the data from a queued cycle, taking into account any NFT specific conflicts.
*
* @param {ReconfigureFundingCycleTxParams} data - The data for reconfiguring the funding cycle.
* @returns {ReconfigureFundingCycleTxParams} - The modified data after resolving conflicts.
*/
return (data: ReconfigureFundingCycleTxParams) => {
if (hasNftConflict(fundingCycleMetadata, queuedFcMetadata)) {
return {
Expand All @@ -70,12 +65,12 @@ export const useResolveEditCycleConflicts = () => {
return {
...data,
fundingCycleMetadata: {
...queuedFcMetadata,
...data.fundingCycleMetadata,
...queuedFcMetadata,
},
fundingCycleData: {
...queuedFcData,
...data.fundingCycleData,
...queuedFcData,
},
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { useForm } from 'antd/lib/form/Form'
import { NftRewardsFormProps } from 'components/NftRewards/AddNftCollectionForm'
import {
EditingFundingCycleConfig,
useEditingFundingCycleConfig,
} from 'components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useEditingFundingCycleConfig'
import { useReconfigureFundingCycle } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useReconfigureFundingCycle'
import { JB721GovernanceType } from 'models/nftRewards'
import { useState } from 'react'
import { useAppSelector } from 'redux/hooks/useAppSelector'
Expand All @@ -10,11 +15,6 @@ import {
pinNftCollectionMetadata,
pinNftRewards,
} from 'utils/nftRewards'
import {
EditingFundingCycleConfig,
useEditingFundingCycleConfig,
} from '../../../ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig'
import { useReconfigureFundingCycle } from '../../../ReconfigureFundingCycleSettingsPage/hooks/useReconfigureFundingCycle'

export const useSettingsLaunchNftsForm = () => {
const [form] = useForm<NftRewardsFormProps>()
Expand Down
3 changes: 0 additions & 3 deletions src/locales/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,6 @@ msgstr ""
msgid "New NFTs will be available in your next cycle as long as it starts after your edit deadline."
msgstr ""

msgid "New NFTs will be available in your next cycle as long as it starts after your edit deadline."
msgstr ""

msgid "Confirm"
msgstr ""

Expand Down
18 changes: 13 additions & 5 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
/** @type {import('tailwindcss').Config} */

const defaultTheme = require('tailwindcss/defaultTheme')

/**
* @typedef { import('tailwindcss').DarkModeConfig } DarkModeConfig
*/

/** @type {DarkModeConfig} */
const darkModeValue = 'class' // Use class for now, switch to media later

module.exports = {
content: [
'./src/pages/**/*.{js,ts,jsx,tsx}',
'./src/components/**/*.{js,ts,jsx,tsx}',
],
darkMode: 'class', // Use class for now, switch to media later
darkMode: darkModeValue,
important: true,
theme: {
fontFamily: {
Expand Down Expand Up @@ -43,12 +51,12 @@ module.exports = {
},
keyframes: {
rise: {
'0%': { transform: 'translate(-50%, 100%)', opacity: 0 },
'100%': { transform: 'translate(0%, 0%)', opacity: 1 },
'0%': { transform: 'translate(-50%, 100%)', opacity: '0' },
'100%': { transform: 'translate(0%, 0%)', opacity: '1' },
},
set: {
'0%': { transform: 'translate(0%, 0%)', opacity: 1 },
'100%': { transform: 'translate(50%, 100%)', opacity: 0 },
'0%': { transform: 'translate(0%, 0%)', opacity: '1' },
'100%': { transform: 'translate(50%, 100%)', opacity: '0' },
},
},
animation: {
Expand Down

0 comments on commit efc69c8

Please sign in to comment.