-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #577 from technologiestiftung/fix/auth-confirm
- Loading branch information
Showing
7 changed files
with
113 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { quotesTag } from '../components/Quotes'; | ||
|
||
describe('quotesTag', () => { | ||
test('wraps a single string in quotation marks', () => { | ||
expect(quotesTag`hello`).toBe(`„hello“`); | ||
}); | ||
|
||
test('wraps multiple strings in quotation marks', () => { | ||
const world = 'world'; | ||
expect(quotesTag`hello ${world} ${23}`).toBe( | ||
`„hello world 23“` | ||
); | ||
}); | ||
|
||
test('returns an empty string when provided an empty array', () => { | ||
expect(quotesTag``).toBe(`„“`); | ||
}); | ||
test('should work with undefined and null', () => { | ||
expect(quotesTag`${undefined}`).toBe(`„undefined“`); | ||
expect(quotesTag`hello ${null}`).toBe(`„hello null“`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import React, { FC } from 'react'; | ||
import Paragraph from '../Paragraph'; | ||
import { Quotes } from '../Quotes'; | ||
|
||
export const NonVerfiedMailMessage: FC = () => { | ||
return ( | ||
<Paragraph> | ||
Du hast deine E-Mail Adresse noch nicht verifiziert. Bitte wirf einen | ||
Blick in dein Postfach, ob du eine E-Mail von | ||
“noreply@mail.app.supabase.io“ erhalten hast und klicke auf | ||
den enthaltenen Link, um dies zu tun. Vielleicht sind wir auch im | ||
Spam-Ordner gelandet? | ||
Blick in dein Postfach, ob du eine E-Mail von{' '} | ||
<Quotes>{process.env.NEXT_PUBLIC_FROM_EMAIL}</Quotes> erhalten hast und | ||
klicke auf den enthaltenen Link, um dies zu tun. Vielleicht sind wir auch | ||
im Spam-Ordner gelandet? | ||
</Paragraph> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
/** | ||
* Use typografically correct quotes for german | ||
*/ | ||
export const Quotes: React.FC = ({ children }) => { | ||
return <span>„{children}“</span>; | ||
}; | ||
/** | ||
* Returns a formatted string containing the provided strings wrapped in quotation marks. | ||
* | ||
*/ | ||
|
||
type InterpolationItem = string | number | boolean | undefined | null; | ||
|
||
export function quotesTag( | ||
strings: TemplateStringsArray, | ||
...values: InterpolationItem[] | ||
): string { | ||
let result = ''; | ||
for (let i = 0; i < strings.length; i++) { | ||
result += strings[i]; | ||
if (i < values.length) { | ||
const value = String(values[i]); | ||
result += `${value}`; | ||
} | ||
} | ||
return `„${result}“`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters