Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,24 @@ function App() {
}

return (
<div className="app">
<h1 className="center fs-45">GET PAID WITHOUT PAYING</h1>
<p className="center ">
<div className="app bg-black">
<h1 className="center white">GET PAID WITHOUT PAYING</h1>
<p
className="center white"
style={{
paddingLeft: '10vw',
paddingRight: '10vw',
fontSize: '16px',
}}
>
No sign-ups. No complicated dashboards. Just edit your invoice right here, right now and
download instantly. It’s free, open-source, and built for freelancers & small agencies who
want less hassle and more time for their actual work.
</p>
<InvoicePage data={data} onChange={onInvoiceUpdated} />
<div className="edit-button-container">
<button className="edit-button">edit template</button>
</div>
{/* <InvoicePage data={data} onChange={onInvoiceUpdated} /> */}
<MyInvoicePage data={data} onChange={onInvoiceUpdated} />
</div>
)
Expand Down
12 changes: 8 additions & 4 deletions src/components/DownloadPDF.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Invoice, TInvoice } from '../data/types'
import { useDebounce } from '@uidotdev/usehooks'
import InvoicePage from './InvoicePage'
import FileSaver from 'file-saver'
import MyInvoicePage from './MyInvoicePage'

interface Props {
data: Invoice
Expand Down Expand Up @@ -48,26 +49,29 @@ const Download: FC<Props> = ({ data, setData }) => {
<div className={'download-pdf '}>
<PDFDownloadLink
key="pdf"
document={<InvoicePage pdfMode={true} data={debounced} />}
document={<MyInvoicePage pdfMode={true} data={debounced} />}
fileName={`${title}.pdf`}
aria-label="Save PDF"
title="Save PDF"
className="download-pdf__pdf"
></PDFDownloadLink>
<p>Save PDF</p>
<p style={{ color: '#ffffff', textDecoration: 'none', fontWeight: 'bold' }}>PDF</p>

<button
{/* <button
onClick={handleSaveTemplate}
aria-label="Save Template"
title="Save Template"
className="download-pdf__template_download mt-40"
style={{
backgroundColor: 'black',
}}
/>
<p className="text-small">Save Template</p>

<label className="download-pdf__template_upload">
<input type="file" accept=".json,.template" onChange={handleInput} />
</label>
<p className="text-small">Upload Template</p>
<p className="text-small">Upload Template</p> */}
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/InvoicePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const InvoicePage: FC<Props> = ({ data, pdfMode, onChange }) => {

return (
<Document pdfMode={pdfMode}>
<Page className="invoice-wrapper" pdfMode={pdfMode}>
<Page className="invoice-wrapper " pdfMode={pdfMode}>
{!pdfMode && <Download data={invoice} setData={(d) => setInvoice(d)} />}

<View className="grid" pdfMode={pdfMode}>
Expand Down
5 changes: 2 additions & 3 deletions src/components/MyInvoicePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ const MyInvoicePage: FC<Props> = ({ data, pdfMode, onChange }) => {
title="Remove Row"
onClick={() => handleRemove(i)}
>
<span className="icon icon-remove bg-red"></span>
<span className="icon icon-remove"></span>
</button>
)}
</View>
Expand All @@ -403,8 +403,7 @@ const MyInvoicePage: FC<Props> = ({ data, pdfMode, onChange }) => {
<View className="w-50 mt-10" pdfMode={pdfMode}>
{!pdfMode && (
<button className="link" onClick={handleAdd}>
<span className="icon icon-add bg-green mr-10"></span>
Add Line Item
<span className="icon icon-add mr-10 cursor-pointer "></span>
</button>
)}
</View>
Expand Down
9 changes: 9 additions & 0 deletions src/images/LogoDaed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/images/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/images/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 10 additions & 25 deletions src/images/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/images/dropdown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading