-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
602 additions
and
459 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,14 @@ | |
# For others consider to use .env.local | ||
|
||
# Disable google analytics when running app in dev mode | ||
NEXT_PUBLIC_DISABLE_GA_IN_DEV_MODE=true | ||
|
||
NEXT_PUBLIC_INSTAGRAM_ADDRESS="https://www.instagram.com/salsavivayerevan/" | ||
NEXT_PUBLIC_FACEBOOK_ADDRESS="https://www.facebook.com/SalsaVivaYerevan/" | ||
NEXT_PUBLIC_WHATSAPP_ADDRESS="https://wa.me/37443108588" | ||
NEXT_PUBLIC_TELEGRAM_ADDRESS="https://t.me/SV_Yerevan" | ||
NEXT_PUBLIC_CONTACT_EMAIL="[email protected]" | ||
NEXT_PUBLIC_CONTACT_PHONE="+374 431 085 88" | ||
|
||
NEXT_PUBLIC_LOCATION_GOOGLE_MAPS_LINK="https://shorturl.at/gsuK5" | ||
NEXT_PUBLIC_LOCATION_ADDRESS_TEXT=" 41, 4 Abovyan St, Yerevan 0009" | ||
|
||
BASE_PATH="/salsaviva" | ||
DISABLE_GA_IN_DEV_MODE=true | ||
|
||
# Socials | ||
INSTAGRAM_ADDRESS="https://www.instagram.com/salsavivayerevan/" | ||
FACEBOOK_ADDRESS="https://www.facebook.com/SalsaVivaYerevan/" | ||
WHATSAPP_ADDRESS="https://wa.me/37443108588" | ||
TELEGRAM_ADDRESS="https://t.me/SV_Yerevan" | ||
CONTACT_EMAIL="[email protected]" | ||
CONTACT_PHONE="+374 431 085 88" | ||
LOCATION_GOOGLE_MAPS_LINK="https://shorturl.at/gsuK5" | ||
LOCATION_ADDRESS_TEXT=" 41, 4 Abovyan St, Yerevan 0009" |
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 |
---|---|---|
|
@@ -5,26 +5,25 @@ on: | |
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
public_path: | ||
assets_path: | ||
type: string | ||
description: 'Inject public path' | ||
description: 'Path to load static assets' | ||
required: false | ||
default: '' | ||
branch: | ||
type: string | ||
description: 'Branch to build' | ||
required: true | ||
default: 'master' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
env: | ||
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }} | ||
FORMSPREE_ID: ${{ secrets.FORMSPREE_ID }} | ||
HOTJAR_ID: ${{ secrets.HOTJAR_ID }} | ||
HOTJAR_SNIPPET_VERSION: ${{ secrets.HOTJAR_SNIPPET_VERSION }} | ||
ASSETS_BASE_PATH: ${{ github.event.inputs.assets_path }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
|
||
- name: Setup Nodejs | ||
uses: actions/setup-node@v3 | ||
|
@@ -36,17 +35,18 @@ jobs: | |
npm pkg delete scripts.prepare | ||
npm ci | ||
- name: Make envfile | ||
uses: SpicyPizza/[email protected] | ||
with: | ||
envkey_NEXT_PUBLIC_GA_TRACKING_ID: "${{ secrets.NEXT_PUBLIC_GA_TRACKING_ID }}" | ||
envkey_NEXT_PUBLIC_FORMSPREE_ID: "${{ secrets.NEXT_PUBLIC_FORMSPREE_ID }}" | ||
envkey_NEXT_PUBLIC_HOTJAR_ID: ${{ secrets.NEXT_PUBLIC_HOTJAR_ID }} | ||
envkey_NEXT_PUBLIC_HOTJAR_SNIPPET_VERSION: ${{ secrets.NEXT_PUBLIC_HOTJAR_SNIPPET_VERSION }} | ||
envkey_PUBLIC_PATH: ${{ github.event.inputs.public_path }} | ||
directory: '.' | ||
file_name: .env.local | ||
fail_on_empty: false | ||
# - name: Setup env | ||
# run: | | ||
# config=' | ||
# GA_TRACKING_ID="${{ secrets.GA_TRACKING_ID }}" | ||
# FORMSPREE_ID="${{ secrets.FORMSPREE_ID }}" | ||
# HOTJAR_ID="${{ secrets.HOTJAR_ID }}" | ||
# HOTJAR_SNIPPET_VERSION="${{ secrets.HOTJAR_SNIPPET_VERSION }}" | ||
|
||
# ASSETS_BASE_PATH="${{ github.event.inputs.assets_path }}" | ||
# ' | ||
# echo "$config" > env.local | ||
# cat ./env.local | ||
|
||
- name: Lint | ||
run: | | ||
|
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 |
---|---|---|
|
@@ -19,8 +19,7 @@ jobs: | |
build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
branch: ${{ github.event.head_commit.message }} | ||
public_path: https://${{ github.repository_owner }}.github.io/${{ github.repository_name }} | ||
assets_path: https://${{ github.repository_owner }}.github.io/${{ github.repository_name }} | ||
secrets: inherit | ||
|
||
deploy: | ||
|
@@ -42,12 +41,12 @@ jobs: | |
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: out | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
folder: out | ||
CLEAN: true | ||
TARGET_FOLDER: . | ||
GIT_CONFIG_NAME: ${{ github.actor }} | ||
GIT_CONFIG_EMAIL: ${{ github.actor }}@users.noreply.github.com | ||
COMMIT_MESSAGE: Deploy from commit ${{ github.sha }} | ||
target-folder: . | ||
git-config-name: ${{ github.actor }} | ||
git-config-email: ${{ github.actor }}@users.noreply.github.com | ||
commit-message: Deploy from commit ${{ github.sha }} | ||
|
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,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged | ||
npx --no-install lint-staged |
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 |
---|---|---|
@@ -1,29 +1,19 @@ | ||
'use client'; | ||
|
||
import {useEffect} from 'react'; | ||
import clsx from 'clsx'; | ||
import Button from '@/components/shared/Button/Button'; | ||
|
||
const errContainerCn = clsx('pt-64', 'flex', 'flex-col', 'gap-8'); | ||
|
||
/** | ||
* @param {{error: Error; reset: () => void}} props Props. | ||
* @returns React component. | ||
*/ | ||
export default function Error({error, reset}: {error: Error; reset: () => void}) { | ||
useEffect(() => { | ||
// Log the error to an error reporting service | ||
// eslint-disable-next-line no-console | ||
console.error(error); | ||
}, [error]); | ||
|
||
export default function Error({reset}: {error: Error; reset: () => void}) { | ||
return ( | ||
<div> | ||
<div className={errContainerCn}> | ||
<h2>Something went wrong!</h2> | ||
<button | ||
onClick={ | ||
// Attempt to recover by trying to re-render the segment | ||
() => reset() | ||
} | ||
> | ||
Try again | ||
</button> | ||
<Button onClick={() => reset()}>Try again</Button> | ||
</div> | ||
); | ||
} |
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
Oops, something went wrong.