0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ChatGPTを使用したアプリ開発記【広告表示機能を実装】

Last updated at Posted at 2025-05-08

実装コード

App.js
        {/* 広告を3件ごとに表示、配列は0からカウントされる為、1足されている。 */}
              {(index + 1) % 3 === 0 && (
                <div
                  style={{
                    padding: '1rem',
                    margin: '1rem 0',
                    backgroundColor: '#f9f9f9',
                    border: '1px solid #ccc',
                    textAlign: 'center',
                  }}
                >
                  <p style={{ fontWeight: 'bold' }}>スポンサーリンク</p>
                  <a href="https://qiita.com/Tomomitsu_Keruma" target="_blank" rel="noopener noreferrer">
                    <img
                      src="/Qiita_keruma_image.png"
                      alt="広告"
                      style={{ maxWidth: '100%', height: 'auto' }}
                    />
                  </a>
                </div>
              )}

広告バナー作成

ChatCPTにお願いしました。

スクリーンショット 2025-05-08 9.01.07.png

UI

スクリーンショット 2025-05-08 8.53.31.png

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?