Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
devEMEL committed Jan 27, 2024
2 parents 32d4976 + 6e6951b commit d430306
Show file tree
Hide file tree
Showing 15 changed files with 553 additions and 614 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
67 changes: 0 additions & 67 deletions frontend/.env.template

This file was deleted.

14 changes: 0 additions & 14 deletions frontend/.vscode/extensions.json

This file was deleted.

68 changes: 0 additions & 68 deletions frontend/.vscode/launch.json

This file was deleted.

13 changes: 0 additions & 13 deletions frontend/.vscode/settings.json

This file was deleted.

15 changes: 0 additions & 15 deletions frontend/.vscode/tasks.json

This file was deleted.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@playwright/test": "^1.35.0",
"@types/jest": "29.5.2",
"@types/node": "18.17.14",
"@types/react": "18.2.11",
"@types/react": "18.2.24",
"@types/react-dom": "18.2.4",
"@typescript-eslint/eslint-plugin": "6.5.0",
"@typescript-eslint/parser": "6.5.0",
Expand All @@ -39,6 +39,7 @@
"@txnlab/use-wallet": "^2.1.1",
"@types/react-router-dom": "^5.3.3",
"@walletconnect/modal-sign-html": "^2.6.1",
"algokit": "^0.0.1",
"algosdk": "^2.5.0",
"daisyui": "^3.1.0",
"notistack": "^3.0.1",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore
import { DeflyWalletConnect } from '@blockshake/defly-connect'
import { DaffiWalletConnect } from '@daffiwallet/connect'
import { PeraWalletConnect } from '@perawallet/connect'
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/Modals/ConfirmModal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// @ts-nocheck

import { useDispatch, useSelector } from 'react-redux'
import { hideConfirmModal } from '../../services/features/confirmModal/confirmModalSlice'
import { RootState } from '../../services/store/store'
import { useSnackbar } from 'notistack'
import { useState } from 'react'



const ConfirmModal = ({ text, txn }) => {
const [loading, setLoading] = useState<boolean>(false)
const { showModal } = useSelector((store: RootState) => store.confirmModal)
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/components/ServicesPage.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// @ts-nocheck
import { FormEvent, useEffect, useState, useRef } from 'react'
import { GoInsureClient } from '../contracts/go_insure'
import { getAlgodConfigFromViteEnvironment } from '../utils/network/getAlgoClientConfigs'
import * as algokit from '@algorandfoundation/algokit-utils'
import { useWallet } from '@txnlab/use-wallet'
import { useSnackbar } from 'notistack'
import algosdk from 'algosdk'
import algosdk, { ABIValue } from 'algosdk'

const ServicesPage = () => {
// const [area, setArea] = useState<number>(479832604)
Expand Down Expand Up @@ -70,6 +71,8 @@ const ServicesPage = () => {
// const _endTimestamp = toTimestamp(endTimestamp)
// const _claimTimestamp = toTimestamp(claimTimestamp)
// }


async function getMyPolicy() {
const _policy = []
for (let boxName of await goInsureClient.appClient.getBoxNames()) {
Expand All @@ -79,9 +82,10 @@ const ServicesPage = () => {

const resultCodec = algosdk.ABIType.from('(address,uint64,bool,uint64,uint64,string,uint64,string,string,string)')
const val = resultCodec.decode(result)

console.log(val)
let policy = {
premAmount: Number(val[1]),
premAmount: Number(val[1] as string),
activeStatus: val[2],
registrationDate: Number(val[3]),
expirationDate: Number(val[4]),
Expand Down Expand Up @@ -222,7 +226,7 @@ const ServicesPage = () => {
/>
</div>
</div>
{/*
{/*
<div className="mb-5">
<label htmlFor="amount" className="text-2xl capitalize">
Amount
Expand Down
Loading

0 comments on commit d430306

Please sign in to comment.